<template>
  <view class="w-full max-w-[750rpx] mx-auto min-h-screen bg-[#f6f8fa] p-[32rpx] box-border">
    <backView />
    <text class="block text-[48rpx] font-extrabold mb-[40rpx] text-center text-blue-600 drop-shadow">{{PageItem.title}}</text>
    
    <!-- 功能按钮 -->
    <view class="flex flex-col gap-[24rpx] mt-[48rpx]">
      <nut-button block type="primary" class="h-[96rpx] rounded-[16rpx] text-[32rpx] font-bold shadow bg-[#27c530]" @click="goList">查看列表</nut-button>
      <nut-button block type="success" class="h-[96rpx] rounded-[16rpx] text-[32rpx] font-bold shadow" @click="goAdd">新增记录</nut-button>
    </view>
  </view>
</template>

<script setup lang="ts">
import Taro from '@tarojs/taro'
import { PageItem } from './fields'
import backView from '@/components/backView.vue'

function goList() {
  Taro.navigateTo({
    url: './list'
  })
}

function goAdd() {
  Taro.navigateTo({
    url: './add'
  })
}
</script>
